import 'package:xin_he/generated/json/base/json_field.dart';
import 'package:xin_he/generated/json/xin_he_bank_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class XinHeBankEntity {
	int? id;
	String? bankType;
	dynamic fUserId;
	String? code;
	String? name;
	String? bankName;
	int? isDefault;
	dynamic removed;
	bool isSelected = false;
	XinHeBankEntity();

	factory XinHeBankEntity.fromJson(Map<String, dynamic> json) => $XinHeBankEntityFromJson(json);

	Map<String, dynamic> toJson() => $XinHeBankEntityToJson(this);

	XinHeBankEntity copyWith({int? id, String? bankType, dynamic fUserId, String? code, String? name, String? bankName, int? isDefault, dynamic removed,}) {
		return XinHeBankEntity()
			..id= id ?? this.id
			..bankType= bankType ?? this.bankType
			..fUserId= fUserId ?? this.fUserId
			..code= code ?? this.code
			..name= name ?? this.name
			..bankName= bankName ?? this.bankName
			..isDefault= isDefault ?? this.isDefault
			..removed= removed ?? this.removed;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}